import { defineStore } from "pinia";

export const alarmStore = defineStore("alarm", {
  state: () => ({
    alarmConfig: {
      voiceEnabled: true, // 语音报警开关
      enabled: true, // 报警总开关
      threshold: 1,
      cooldownTime: 30000
    },
  }),
  actions: {
    toggleVoiceAlert() {
      this.alarmConfig.voiceEnabled = !this.alarmConfig.voiceEnabled;
    },
  },
});